#include "AnimatedGraphic.h"
#include <SDL.h>

AnimatedGraphic::AnimatedGraphic(const LoadedParams* Param, int animationSpeed, int numFrames) : SDLGameObject(Param), mAnimationSpeed(animationSpeed), mNumFrames(numFrames)
{
}


AnimatedGraphic::~AnimatedGraphic(void)
{
}

void AnimatedGraphic::Update()
{
	currentFrame = int(((SDL_GetTicks() / (1000 / mAnimationSpeed) % mNumFrames)));
	SDLGameObject::Update();
}

void AnimatedGraphic::Draw()
{
	SDLGameObject::Draw();
}

void AnimatedGraphic::Shutdown()
{
	SDLGameObject::Shutdown();
}

bool AnimatedGraphic::isActive()
{
	return SDLGameObject::isActive();
}
